@itcase/ui 1.3.25 → 1.3.26
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-Bcj5H3vs.js → Badge-CcaG-4ly.js} +49 -8
- package/dist/{Badge-DxHwStfq.js → Badge-CoHPvO35.js} +49 -8
- package/dist/{Button-BSygAkO5.js → Button-BFX_EEum.js} +6 -6
- package/dist/{Button-Bn8Mjoeh.js → Button-BSzqA8CB.js} +6 -6
- package/dist/{DropdownItem-CExjlJjQ.js → DropdownItem-Bq-oPnWX.js} +4 -4
- package/dist/{DropdownItem-DFE1HsyX.js → DropdownItem-FNOztnTT.js} +4 -4
- package/dist/{Group-CIIZoSm5.js → Group-B9L2NTgM.js} +1 -1
- package/dist/{Group-pMTTxQH4.js → Group-D6CXN4hS.js} +1 -1
- package/dist/{Icon-DotE-03d.js → Icon-BZa8B7te.js} +3 -3
- package/dist/{Icon-ByLHEhHL.js → Icon-B_bS-o4g.js} +2 -2
- package/dist/{Input-Ck5IbuH6.js → Input-BrV5_NoV.js} +1 -1
- package/dist/{Input-zkYoZhQk.js → Input-ffioh1sj.js} +1 -1
- package/dist/{Label-9O3dQlUa.js → Label-DQyB2ThM.js} +6 -6
- package/dist/{Label-GEBQXoVJ.js → Label-HKRKV3mn.js} +6 -6
- package/dist/{Link-CoAhRbFg.js → Link-CxWmYMyL.js} +1 -1
- package/dist/{Link-C53o3P6_.js → Link-DN2LhPjD.js} +4 -4
- package/dist/{Loader-D_53c71f.js → Loader-Dn036JwE.js} +2 -2
- package/dist/{Loader-Cm98w6lJ.js → Loader-K_DJmah6.js} +2 -2
- package/dist/{MenuItem-Cu6wlj-X.js → MenuItem-CLDNk2l8.js} +3 -3
- package/dist/{MenuItem-Ybh5Mpoi.js → MenuItem-amqx61Y0.js} +3 -3
- package/dist/{Scrollbar-DkJr3S-w.js → Scrollbar-Bo7z7ELm.js} +1 -1
- package/dist/{Scrollbar-CL9V8d1X.js → Scrollbar-CKbA0jQU.js} +1 -1
- package/dist/{Text-COHpLTYr.js → Text-Beslj4Ns.js} +1 -1
- package/dist/{Text-D9sEeRE4.js → Text-JayJa3hj.js} +1 -1
- package/dist/{Title-Cl95USIn.js → Title-CHgrIarR.js} +1 -1
- package/dist/{Title-BduD-TXE.js → Title-DBaHcpvB.js} +1 -1
- package/dist/{Tooltip-BsbXMzGd.js → Tooltip-1Jbub0K6.js} +4 -4
- package/dist/{Tooltip-CyZCVyba.js → Tooltip-CNua1g76.js} +4 -4
- package/dist/cjs/components/Accordion.js +8 -7
- package/dist/cjs/components/Avatar.js +10 -9
- package/dist/cjs/components/Badge.js +4 -3
- package/dist/cjs/components/Breadcrumbs.js +7 -6
- package/dist/cjs/components/Button.js +8 -7
- package/dist/cjs/components/Caption.js +1 -0
- package/dist/cjs/components/Card.js +3 -2
- package/dist/cjs/components/Cell.js +8 -7
- package/dist/cjs/components/Checkbox.js +4 -3
- package/dist/cjs/components/Checkmark.js +8 -7
- package/dist/cjs/components/Chips.js +5 -4
- package/dist/cjs/components/Choice.js +11 -10
- package/dist/cjs/components/Code.js +4 -3
- package/dist/cjs/components/CookiesWarning.js +11 -10
- package/dist/cjs/components/DadataHintField.js +2 -1
- package/dist/cjs/components/DatePicker.js +17 -16
- package/dist/cjs/components/Divider.js +1 -0
- package/dist/cjs/components/Dot.js +1 -0
- package/dist/cjs/components/Dropdown.js +4 -3
- package/dist/cjs/components/Flex.js +3 -2
- package/dist/cjs/components/Grid.js +3 -2
- package/dist/cjs/components/Group.js +2 -1
- package/dist/cjs/components/HTMLContent.js +1 -0
- package/dist/cjs/components/HeroTitle.js +2 -1
- package/dist/cjs/components/Icon.js +6 -5
- package/dist/cjs/components/Image.js +1 -0
- package/dist/cjs/components/Input.js +2 -1
- package/dist/cjs/components/InputMask.js +2 -1
- package/dist/cjs/components/InputPassword.js +6 -5
- package/dist/cjs/components/Label.js +5 -4
- package/dist/cjs/components/Link.js +2 -1
- package/dist/cjs/components/List.js +2 -1
- package/dist/cjs/components/Loader.js +3 -2
- package/dist/cjs/components/Logo.js +3 -2
- package/dist/cjs/components/Menu.js +5 -4
- package/dist/cjs/components/MenuItem.js +4 -3
- package/dist/cjs/components/Modal.js +6 -5
- package/dist/cjs/components/ModalSheetBottom.js +1 -0
- package/dist/cjs/components/Notification.js +4 -3
- package/dist/cjs/components/Overlay.js +1 -0
- package/dist/cjs/components/Pagination.js +29 -28
- package/dist/cjs/components/Panel.js +3 -2
- package/dist/cjs/components/Radio.js +4 -3
- package/dist/cjs/components/RangeSlider.js +1 -0
- package/dist/cjs/components/Response.js +14 -13
- package/dist/cjs/components/SVGContent.js +1 -0
- package/dist/cjs/components/ScrollOnDrag.js +1 -0
- package/dist/cjs/components/ScrollToView.js +2 -1
- package/dist/cjs/components/Scrollbar.js +1 -1
- package/dist/cjs/components/Search.js +10 -9
- package/dist/cjs/components/Segmented.js +14 -13
- package/dist/cjs/components/Select.js +11 -10
- package/dist/cjs/components/SiteMenu.js +7 -6
- package/dist/cjs/components/Swiper.js +9 -8
- package/dist/cjs/components/Tab.js +10 -9
- package/dist/cjs/components/Text.js +2 -1
- package/dist/cjs/components/Textarea.js +1 -0
- package/dist/cjs/components/Tile.js +5 -4
- package/dist/cjs/components/Title.js +2 -1
- package/dist/cjs/components/Tooltip.js +4 -3
- package/dist/cjs/components/Video.js +1 -0
- package/dist/cjs/components/Wrapper.js +2 -1
- package/dist/cjs/context/Notifications.js +6 -6
- package/dist/cjs/context/UIContext.js +6 -1
- package/dist/cjs/hooks/useDeviceTargetClass.js +1 -0
- package/dist/cjs/hooks/useDeviceTargetClassGenerator.interface.js +1 -0
- package/dist/cjs/hooks/useDeviceTargetClassGenerator.js +5 -4
- package/dist/cjs/hooks/useMediaQueries.js +0 -12
- package/dist/cjs/hooks/useStyles.js +1 -0
- package/dist/cjs/hooks.js +0 -1
- package/dist/cjs/utils/setViewportProperty.js +8 -0
- package/dist/cjs/utils.js +7 -0
- package/dist/components/Accordion.js +9 -8
- package/dist/components/Avatar.js +11 -10
- package/dist/components/Badge.js +4 -3
- package/dist/components/Breadcrumbs.js +8 -7
- package/dist/components/Button.js +9 -8
- package/dist/components/Caption.js +2 -1
- package/dist/components/Card.js +4 -3
- package/dist/components/Cell.js +9 -8
- package/dist/components/Checkbox.js +5 -4
- package/dist/components/Checkmark.js +9 -8
- package/dist/components/Chips.js +6 -5
- package/dist/components/Choice.js +12 -11
- package/dist/components/Code.js +5 -4
- package/dist/components/CookiesWarning.js +12 -11
- package/dist/components/DadataHintField.js +3 -2
- package/dist/components/DatePicker.js +18 -17
- package/dist/components/Divider.js +2 -1
- package/dist/components/Dot.js +2 -1
- package/dist/components/Dropdown.js +5 -4
- package/dist/components/Flex.js +4 -3
- package/dist/components/Grid.js +4 -3
- package/dist/components/Group.js +3 -2
- package/dist/components/HTMLContent.js +2 -1
- package/dist/components/HeroTitle.js +3 -2
- package/dist/components/Icon.js +7 -6
- package/dist/components/Image.js +2 -1
- package/dist/components/Input.js +3 -2
- package/dist/components/InputMask.js +3 -2
- package/dist/components/InputPassword.js +7 -6
- package/dist/components/Label.js +6 -5
- package/dist/components/Link.js +3 -2
- package/dist/components/List.js +3 -2
- package/dist/components/Loader.js +4 -3
- package/dist/components/Logo.js +4 -3
- package/dist/components/Menu.js +6 -5
- package/dist/components/MenuItem.js +5 -4
- package/dist/components/Modal.js +7 -6
- package/dist/components/ModalSheetBottom.js +2 -1
- package/dist/components/Notification.js +5 -4
- package/dist/components/Overlay.js +2 -1
- package/dist/components/Pagination.js +30 -29
- package/dist/components/Panel.js +4 -3
- package/dist/components/Radio.js +5 -4
- package/dist/components/RangeSlider.js +2 -1
- package/dist/components/Response.js +15 -14
- package/dist/components/SVGContent.js +2 -1
- package/dist/components/ScrollOnDrag.js +2 -1
- package/dist/components/ScrollToView.js +3 -2
- package/dist/components/Scrollbar.js +1 -1
- package/dist/components/Search.js +11 -10
- package/dist/components/Segmented.js +15 -14
- package/dist/components/Select.js +12 -11
- package/dist/components/SiteMenu.js +8 -7
- package/dist/components/Swiper.js +10 -9
- package/dist/components/Tab.js +11 -10
- package/dist/components/Text.js +3 -2
- package/dist/components/Textarea.js +2 -1
- package/dist/components/Tile.js +6 -5
- package/dist/components/Title.js +3 -2
- package/dist/components/Tooltip.js +5 -4
- package/dist/components/Video.js +1 -0
- package/dist/components/Wrapper.js +3 -2
- package/dist/context/Notifications.js +7 -7
- package/dist/context/UIContext.js +7 -2
- package/dist/css/components/Checkmark/Checkmark.css +2 -2
- package/dist/css/components/Checkmark/Checkmark.tokens.css +16 -0
- package/dist/css/components/Swiper/Swiper.css +2 -2
- package/dist/css/tokens/colors.css +9 -0
- package/dist/hooks/useDeviceTargetClass.js +1 -0
- package/dist/hooks/useDeviceTargetClassGenerator.interface.js +1 -1
- package/dist/hooks/useDeviceTargetClassGenerator.js +6 -5
- package/dist/hooks/useMediaQueries.js +0 -12
- package/dist/hooks/useStyles.js +1 -0
- package/dist/hooks.js +1 -1
- package/dist/stories/Avatar.mdx +1 -1
- package/dist/stories/Checkmark.mdx +11 -0
- package/dist/stories/Overview.mdx +5 -5
- package/dist/stories/Playground.mdx +4 -4
- package/dist/{tslib.es6-5FtW-kfi.js → tslib.es6-Bwu1Cn-t.js} +1 -1
- package/dist/types/components/Badge/stories/args.d.ts +69 -0
- package/dist/types/components/Select/index.d.ts +15 -15
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/setViewportProperty.d.ts +2 -0
- package/dist/utils/setViewportProperty.js +6 -0
- package/dist/utils.js +1 -0
- package/package.json +29 -53
|
@@ -4,9 +4,9 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var clsx = require('clsx');
|
|
5
5
|
var useDeviceTargetClassGenerator = require('../hooks/useDeviceTargetClassGenerator.js');
|
|
6
6
|
var useStyles = require('../hooks/useStyles.js');
|
|
7
|
-
var Badge = require('../../Badge-
|
|
8
|
-
var Text = require('../../Text-
|
|
9
|
-
var Title = require('../../Title-
|
|
7
|
+
var Badge = require('../../Badge-CoHPvO35.js');
|
|
8
|
+
var Text = require('../../Text-Beslj4Ns.js');
|
|
9
|
+
var Title = require('../../Title-DBaHcpvB.js');
|
|
10
10
|
require('../../tslib.es6-CCZ3TN_7.js');
|
|
11
11
|
require('react');
|
|
12
12
|
require('lodash/camelCase');
|
|
@@ -14,6 +14,7 @@ require('lodash/castArray');
|
|
|
14
14
|
require('../context/UIContext.js');
|
|
15
15
|
require('../hooks/useMediaQueries.js');
|
|
16
16
|
require('react-responsive');
|
|
17
|
+
require('../utils/setViewportProperty.js');
|
|
17
18
|
require('lodash/maxBy');
|
|
18
19
|
require('lodash/upperFirst');
|
|
19
20
|
require('../hooks/styleAttributes.js');
|
|
@@ -36,7 +37,7 @@ function Tile(props) {
|
|
|
36
37
|
var alignClass = classGenerator.alignClass, alignDirectionClass = classGenerator.alignDirectionClass, borderColorClass = classGenerator.borderColorClass, borderColorHoverClass = classGenerator.borderColorHoverClass, borderTypeClass = classGenerator.borderTypeClass, borderWidthClass = classGenerator.borderWidthClass, fillClass = classGenerator.fillClass, shapeClass = classGenerator.shapeClass;
|
|
37
38
|
// @ts-expect-error
|
|
38
39
|
var tileStyles = useStyles.useStyles(props).styles;
|
|
39
|
-
return (jsxRuntime.jsx("div", { className: clsx('tile', className, fillClass && "fill_".concat(fillClass), shapeClass && "tile_shape_".concat(shapeClass), alignClass && "align_".concat(alignClass), alignDirectionClass && "align_".concat(alignDirectionClass), direction && "direction_".concat(direction), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), reverse && 'tile_reverse', size && "tile_size_".concat(size), type && "tile_type_".concat(type), badge && "tile_state_badge"), style: tileStyles, onClick: onClick, children: jsxRuntime.jsxs("div", { className: clsx('tile__wrapper', alignClass, alignDirectionClass), children: [before, title && (jsxRuntime.jsx(Title.Title, { className: "tile__title", size: titleTextSize || (appearanceConfig === null || appearanceConfig ===
|
|
40
|
+
return (jsxRuntime.jsx("div", { className: clsx('tile', className, fillClass && "fill_".concat(fillClass), shapeClass && "tile_shape_".concat(shapeClass), alignClass && "align_".concat(alignClass), alignDirectionClass && "align_".concat(alignDirectionClass), direction && "direction_".concat(direction), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), reverse && 'tile_reverse', size && "tile_size_".concat(size), type && "tile_type_".concat(type), badge && "tile_state_badge"), style: tileStyles, onClick: onClick, children: jsxRuntime.jsxs("div", { className: clsx('tile__wrapper', alignClass, alignDirectionClass), children: [before, title && (jsxRuntime.jsx(Title.Title, { className: "tile__title", size: titleTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.titleTextSize), textAlign: titleTextAlign, textColor: titleTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.titleTextColor), textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), text && (jsxRuntime.jsx(Text.Text, { className: "tile__text", size: textSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.textSize), textColor: textColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.textColor), textWrap: textWrap, children: text })), badge && (jsxRuntime.jsx(Badge.Badge, { className: "tile__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, value: badge })), children, after] }) }));
|
|
40
41
|
}
|
|
41
42
|
Tile.defaultProps = {
|
|
42
43
|
alignDirection: 'vertical',
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var Title = require('../../Title-
|
|
3
|
+
var Title = require('../../Title-DBaHcpvB.js');
|
|
4
4
|
require('react/jsx-runtime');
|
|
5
5
|
require('react');
|
|
6
6
|
require('clsx');
|
|
7
7
|
require('../context/UIContext.js');
|
|
8
8
|
require('../hooks/useMediaQueries.js');
|
|
9
9
|
require('react-responsive');
|
|
10
|
+
require('../utils/setViewportProperty.js');
|
|
10
11
|
require('../hooks/useDeviceTargetClassGenerator.js');
|
|
11
12
|
require('../../tslib.es6-CCZ3TN_7.js');
|
|
12
13
|
require('lodash/camelCase');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var Tooltip = require('../../Tooltip-
|
|
3
|
+
var Tooltip = require('../../Tooltip-CNua1g76.js');
|
|
4
4
|
require('react/jsx-runtime');
|
|
5
5
|
require('react');
|
|
6
6
|
require('clsx');
|
|
@@ -11,12 +11,13 @@ require('lodash/castArray');
|
|
|
11
11
|
require('../context/UIContext.js');
|
|
12
12
|
require('../hooks/useMediaQueries.js');
|
|
13
13
|
require('react-responsive');
|
|
14
|
+
require('../utils/setViewportProperty.js');
|
|
14
15
|
require('../hooks/useStyles.js');
|
|
15
16
|
require('lodash/maxBy');
|
|
16
17
|
require('lodash/upperFirst');
|
|
17
18
|
require('../hooks/styleAttributes.js');
|
|
18
|
-
require('../../Text-
|
|
19
|
-
require('../../Title-
|
|
19
|
+
require('../../Text-Beslj4Ns.js');
|
|
20
|
+
require('../../Title-DBaHcpvB.js');
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
|
|
@@ -10,6 +10,7 @@ require('lodash/upperFirst');
|
|
|
10
10
|
require('../context/UIContext.js');
|
|
11
11
|
require('../hooks/useMediaQueries.js');
|
|
12
12
|
require('react-responsive');
|
|
13
|
+
require('../utils/setViewportProperty.js');
|
|
13
14
|
require('../hooks/styleAttributes.js');
|
|
14
15
|
|
|
15
16
|
function Video(props) {
|
|
@@ -11,12 +11,13 @@ require('lodash/castArray');
|
|
|
11
11
|
require('../context/UIContext.js');
|
|
12
12
|
require('../hooks/useMediaQueries.js');
|
|
13
13
|
require('react-responsive');
|
|
14
|
+
require('../utils/setViewportProperty.js');
|
|
14
15
|
require('lodash/maxBy');
|
|
15
16
|
require('lodash/upperFirst');
|
|
16
17
|
require('../hooks/styleAttributes.js');
|
|
17
18
|
|
|
18
19
|
function Wrapper(props) {
|
|
19
|
-
var id = props.id, children = props.children, after = props.after, before = props.before, _a = props.className, className = _a ===
|
|
20
|
+
var id = props.id, children = props.children, after = props.after, before = props.before, _a = props.className, className = _a === void 0 ? 'wrapper' : _a, _b = props.tag, Tag = _b === void 0 ? 'div' : _b, type = props.type;
|
|
20
21
|
var classGenerator = useDeviceTargetClassGenerator.useDeviceTargetClassGenerator(props);
|
|
21
22
|
var alignClass = classGenerator.alignClass, alignDirectionClass = classGenerator.alignDirectionClass, fillClass = classGenerator.fillClass, horizontalResizingClass = classGenerator.horizontalResizingClass, positionClass = classGenerator.positionClass, verticalResizingClass = classGenerator.verticalResizingClass, wrapperPositionClass = classGenerator.wrapperPositionClass;
|
|
22
23
|
// @ts-expect-error
|
|
@@ -19,7 +19,7 @@ var NotificationsAPIContext = React.createContext({
|
|
|
19
19
|
showNotification: function (notification, onClose) { },
|
|
20
20
|
});
|
|
21
21
|
function NotificationsProvider(props) {
|
|
22
|
-
var children = props.children, _a = props.initialNotificationsList, initialNotificationsList = _a ===
|
|
22
|
+
var children = props.children, _a = props.initialNotificationsList, initialNotificationsList = _a === void 0 ? [] : _a;
|
|
23
23
|
var _b = React.useState(function () {
|
|
24
24
|
// We need to set id to every notification item and original list also be have new id's
|
|
25
25
|
return (initialNotificationsList || []).map(function (notificationItem) {
|
|
@@ -112,11 +112,11 @@ function createNotification(notification, onClose) {
|
|
|
112
112
|
text = notification;
|
|
113
113
|
}
|
|
114
114
|
else if (typeof notification === 'object') {
|
|
115
|
-
id = (_a = notification.id) !== null && _a !==
|
|
116
|
-
title = (_b = notification.title) !== null && _b !==
|
|
117
|
-
text = (_c = notification.text) !== null && _c !==
|
|
118
|
-
status = (_d = notification.status) !== null && _d !==
|
|
119
|
-
closeByTime = (_e = notification.closeByTime) !== null && _e !==
|
|
115
|
+
id = (_a = notification.id) !== null && _a !== void 0 ? _a : id;
|
|
116
|
+
title = (_b = notification.title) !== null && _b !== void 0 ? _b : title;
|
|
117
|
+
text = (_c = notification.text) !== null && _c !== void 0 ? _c : text;
|
|
118
|
+
status = (_d = notification.status) !== null && _d !== void 0 ? _d : status;
|
|
119
|
+
closeByTime = (_e = notification.closeByTime) !== null && _e !== void 0 ? _e : closeByTime;
|
|
120
120
|
}
|
|
121
121
|
switch (status) {
|
|
122
122
|
case 'success':
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var useMediaQueries = require('../hooks/useMediaQueries.js');
|
|
7
|
+
var setViewportProperty = require('../utils/setViewportProperty.js');
|
|
7
8
|
require('react-responsive');
|
|
8
9
|
|
|
9
10
|
var UserDeviceContext = React.createContext({
|
|
@@ -22,9 +23,13 @@ function useSiteMenuContext() {
|
|
|
22
23
|
return React.useContext(SiteMenuContext);
|
|
23
24
|
}
|
|
24
25
|
var UIProvider = React.memo(function UIProvider(props) {
|
|
25
|
-
var children = props.children, _a = props.userDeviceState, userDeviceState = _a ===
|
|
26
|
+
var children = props.children, _a = props.userDeviceState, userDeviceState = _a === void 0 ? {} : _a;
|
|
26
27
|
var _b = React.useState(false), isSiteMenuOpen = _b[0], setIsSiteMenuOpen = _b[1];
|
|
27
28
|
var siteMenuContextState = React.useMemo(function () { return ({ isSiteMenuOpen: isSiteMenuOpen, setIsSiteMenuOpen: setIsSiteMenuOpen }); }, [isSiteMenuOpen]);
|
|
29
|
+
React.useEffect(function () {
|
|
30
|
+
setViewportProperty.setViewportProperty();
|
|
31
|
+
window.addEventListener('resize', setViewportProperty.setViewportProperty);
|
|
32
|
+
}, []);
|
|
28
33
|
var mediaQueriesDevices = useMediaQueries.useMediaQueries(userDeviceState);
|
|
29
34
|
return (jsxRuntime.jsx(UserDeviceContext.Provider, { value: mediaQueriesDevices, children: jsxRuntime.jsx(SiteMenuContext.Provider, { value: siteMenuContextState, children: children }) }));
|
|
30
35
|
});
|
|
@@ -7,6 +7,7 @@ var UIContext = require('../context/UIContext.js');
|
|
|
7
7
|
require('react/jsx-runtime');
|
|
8
8
|
require('./useMediaQueries.js');
|
|
9
9
|
require('react-responsive');
|
|
10
|
+
require('../utils/setViewportProperty.js');
|
|
10
11
|
|
|
11
12
|
function useDeviceTargetClass(componentProps, hookProps) {
|
|
12
13
|
/** Generate a class depending on the user's device.
|
|
@@ -8,6 +8,7 @@ var UIContext = require('../context/UIContext.js');
|
|
|
8
8
|
require('react/jsx-runtime');
|
|
9
9
|
require('./useMediaQueries.js');
|
|
10
10
|
require('react-responsive');
|
|
11
|
+
require('../utils/setViewportProperty.js');
|
|
11
12
|
|
|
12
13
|
function useDeviceTargetClassGenerator(componentProps, appearanceConfig) {
|
|
13
14
|
/** Generate a class depending on the user's device.
|
|
@@ -37,8 +38,8 @@ function useDeviceTargetClassGenerator(componentProps, appearanceConfig) {
|
|
|
37
38
|
var deviceTargetClassGenerator = React.useMemo(function () {
|
|
38
39
|
var classGenerator = {
|
|
39
40
|
getClass: function (propsKey, params) {
|
|
40
|
-
if (params ===
|
|
41
|
-
var _a = params.prefix, prefix = _a ===
|
|
41
|
+
if (params === void 0) { params = {}; }
|
|
42
|
+
var _a = params.prefix, prefix = _a === void 0 ? '' : _a, _b = params.replace, replace = _b === void 0 ? [/([A-Z])/g, '-$1'] : _b;
|
|
42
43
|
// prettier-ignore
|
|
43
44
|
var deviceBasePart = ((isMobile && 'Mobile') ||
|
|
44
45
|
(isTablet && 'Tablet') ||
|
|
@@ -46,8 +47,8 @@ function useDeviceTargetClassGenerator(componentProps, appearanceConfig) {
|
|
|
46
47
|
'');
|
|
47
48
|
var valueForDevice = componentProps["".concat(propsKey).concat(deviceBasePart)];
|
|
48
49
|
var valueDefault = componentProps[propsKey];
|
|
49
|
-
var appearanceForDevice = appearanceConfig === null || appearanceConfig ===
|
|
50
|
-
var appearanceDefault = appearanceConfig === null || appearanceConfig ===
|
|
50
|
+
var appearanceForDevice = appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig["".concat(propsKey).concat(deviceBasePart)];
|
|
51
|
+
var appearanceDefault = appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig[propsKey];
|
|
51
52
|
// prettier-ignore
|
|
52
53
|
var targetClassValue = (
|
|
53
54
|
// Value for device from props is first priority
|
|
@@ -5,21 +5,9 @@ var reactResponsive = require('react-responsive');
|
|
|
5
5
|
var tablet = "48em";
|
|
6
6
|
var mediaQueries = {
|
|
7
7
|
"mobile-tiny": "15em",
|
|
8
|
-
"mobile-small": "20em",
|
|
9
|
-
"mobile-medium": "23.435em",
|
|
10
|
-
"mobile-normal": "24.375em",
|
|
11
|
-
"mobile-large": "26.75em",
|
|
12
|
-
"mobile-extra-large": "30em",
|
|
13
8
|
"mobile-super-extra-large": "40em",
|
|
14
9
|
tablet: tablet,
|
|
15
|
-
"tablet-small": "40em",
|
|
16
|
-
"tablet-large": "60em",
|
|
17
10
|
"desktop-small": "60em",
|
|
18
|
-
"desktop-medium": "64em",
|
|
19
|
-
"desktop-normal": "72.5em",
|
|
20
|
-
"desktop-large": "80em",
|
|
21
|
-
"desktop-extra-large": "90em",
|
|
22
|
-
"desktop-super-extra-large": "120em",
|
|
23
11
|
"desktop-huge": "160em"
|
|
24
12
|
};
|
|
25
13
|
|
|
@@ -9,6 +9,7 @@ var styleAttributes = require('./styleAttributes.js');
|
|
|
9
9
|
require('react/jsx-runtime');
|
|
10
10
|
require('./useMediaQueries.js');
|
|
11
11
|
require('react-responsive');
|
|
12
|
+
require('../utils/setViewportProperty.js');
|
|
12
13
|
|
|
13
14
|
let DEVICE_TYPES = [];
|
|
14
15
|
const removeDeviceType = originalKey => {
|
package/dist/cjs/hooks.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as __spreadArray } from '../tslib.es6-Bwu1Cn-t.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React, { useCallback, useState, useMemo } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
@@ -7,19 +7,20 @@ import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGene
|
|
|
7
7
|
import { useStyles } from '../hooks/useStyles.js';
|
|
8
8
|
import { icon16 } from '@itcase/icons/default';
|
|
9
9
|
import { D as Divider } from '../Divider-DBvDCUqP.js';
|
|
10
|
-
import { I as Icon } from '../Icon-
|
|
11
|
-
import { T as Text } from '../Text-
|
|
10
|
+
import { I as Icon } from '../Icon-BZa8B7te.js';
|
|
11
|
+
import { T as Text } from '../Text-JayJa3hj.js';
|
|
12
12
|
import 'lodash/camelCase';
|
|
13
13
|
import '../context/UIContext.js';
|
|
14
14
|
import '../hooks/useMediaQueries.js';
|
|
15
15
|
import 'react-responsive';
|
|
16
|
+
import '../utils/setViewportProperty.js';
|
|
16
17
|
import 'lodash/maxBy';
|
|
17
18
|
import 'lodash/upperFirst';
|
|
18
19
|
import '../hooks/styleAttributes.js';
|
|
19
20
|
import 'react-inlinesvg';
|
|
20
|
-
import '../Link-
|
|
21
|
-
import '../Tooltip-
|
|
22
|
-
import '../Title-
|
|
21
|
+
import '../Link-DN2LhPjD.js';
|
|
22
|
+
import '../Tooltip-1Jbub0K6.js';
|
|
23
|
+
import '../Title-CHgrIarR.js';
|
|
23
24
|
|
|
24
25
|
var accordionAppearance = {
|
|
25
26
|
dev: {},
|
|
@@ -35,7 +36,7 @@ var accordionItemConfig = {
|
|
|
35
36
|
},
|
|
36
37
|
};
|
|
37
38
|
function AccordionItem(props) {
|
|
38
|
-
var id = props.id, children = props.children, isExpanded = props.isExpanded, afterContent = props.afterContent, appearance = props.appearance, beforeContent = props.beforeContent, className = props.className, content = props.content, contentTextColor = props.contentTextColor, contentTextSize = props.contentTextSize, contentTextWeight = props.contentTextWeight, dividerDirection = props.dividerDirection, dividerFill = props.dividerFill, dividerSize = props.dividerSize, icon = props.icon, _a = props.iconFill, iconFill = _a ===
|
|
39
|
+
var id = props.id, children = props.children, isExpanded = props.isExpanded, afterContent = props.afterContent, appearance = props.appearance, beforeContent = props.beforeContent, className = props.className, content = props.content, contentTextColor = props.contentTextColor, contentTextSize = props.contentTextSize, contentTextWeight = props.contentTextWeight, dividerDirection = props.dividerDirection, dividerFill = props.dividerFill, dividerSize = props.dividerSize, icon = props.icon, _a = props.iconFill, iconFill = _a === void 0 ? 'surfaceItemAccent' : _a, showDivider = props.showDivider, size = props.size, title = props.title, titleTextColor = props.titleTextColor, titleTextSize = props.titleTextSize, titleTextWeight = props.titleTextWeight, onClick = props.onClick;
|
|
39
40
|
var onClickTitle = useCallback(function () {
|
|
40
41
|
// "!isExpanded" - is next state of expanded
|
|
41
42
|
var thisItemData = {
|
|
@@ -63,7 +64,7 @@ var accordionConfig = {
|
|
|
63
64
|
},
|
|
64
65
|
};
|
|
65
66
|
function Accordion(props) {
|
|
66
|
-
var children = props.children, isMultiple = props.isMultiple, appearance = props.appearance, className = props.className, _a = props.initial, initial = _a ===
|
|
67
|
+
var children = props.children, isMultiple = props.isMultiple, appearance = props.appearance, className = props.className, _a = props.initial, initial = _a === void 0 ? [] : _a, items = props.items, onClickItem = props.onClickItem;
|
|
67
68
|
var _b = useState(function () { return castArray(initial); }), expandedItems = _b[0], setExpandedItems = _b[1];
|
|
68
69
|
var onClickAccordionItem = useCallback(function (targetItem) {
|
|
69
70
|
setExpandedItems(function (prevState) {
|
|
@@ -2,23 +2,24 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
5
|
-
import { I as Icon } from '../Icon-
|
|
5
|
+
import { I as Icon } from '../Icon-BZa8B7te.js';
|
|
6
6
|
import { I as Image } from '../Image-D-QHhsrC.js';
|
|
7
|
-
import { T as Text } from '../Text-
|
|
8
|
-
import '../tslib.es6-
|
|
7
|
+
import { T as Text } from '../Text-JayJa3hj.js';
|
|
8
|
+
import '../tslib.es6-Bwu1Cn-t.js';
|
|
9
9
|
import 'lodash/camelCase';
|
|
10
10
|
import 'lodash/castArray';
|
|
11
11
|
import '../context/UIContext.js';
|
|
12
12
|
import '../hooks/useMediaQueries.js';
|
|
13
13
|
import 'react-responsive';
|
|
14
|
+
import '../utils/setViewportProperty.js';
|
|
14
15
|
import 'react-inlinesvg';
|
|
15
16
|
import '../hooks/useStyles.js';
|
|
16
17
|
import 'lodash/maxBy';
|
|
17
18
|
import 'lodash/upperFirst';
|
|
18
19
|
import '../hooks/styleAttributes.js';
|
|
19
|
-
import '../Link-
|
|
20
|
-
import '../Tooltip-
|
|
21
|
-
import '../Title-
|
|
20
|
+
import '../Link-DN2LhPjD.js';
|
|
21
|
+
import '../Tooltip-1Jbub0K6.js';
|
|
22
|
+
import '../Title-CHgrIarR.js';
|
|
22
23
|
|
|
23
24
|
var avatarAppearance = {
|
|
24
25
|
dev: {},
|
|
@@ -31,17 +32,17 @@ var avatarConfig = {
|
|
|
31
32
|
},
|
|
32
33
|
};
|
|
33
34
|
function Avatar(props) {
|
|
34
|
-
var after = props.after, appearance = props.appearance, before = props.before, className = props.className, Dot = props.Dot, _a = props.firstName, firstName = _a ===
|
|
35
|
+
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;
|
|
35
36
|
var avatarChars = useMemo(function () {
|
|
36
|
-
var firstChar = ((firstName === null || firstName ===
|
|
37
|
-
var secondChar = ((secondName === null || secondName ===
|
|
37
|
+
var firstChar = ((firstName === null || firstName === void 0 ? void 0 : firstName[0]) || '').toUpperCase();
|
|
38
|
+
var secondChar = ((secondName === null || secondName === void 0 ? void 0 : secondName[0]) || '').toUpperCase();
|
|
38
39
|
return "".concat(firstChar).concat(secondChar);
|
|
39
40
|
}, [firstName, secondName]);
|
|
40
41
|
// @ts-expect-error
|
|
41
42
|
var appearanceConfig = avatarConfig.appearance && avatarConfig.appearance[appearance];
|
|
42
43
|
var classGenerator = useDeviceTargetClassGenerator(props, appearanceConfig);
|
|
43
44
|
var fillClass = classGenerator.fillClass, fillHoverClass = classGenerator.fillHoverClass, shapeClass = classGenerator.shapeClass;
|
|
44
|
-
return (jsx("div", { className: clsx(className, 'avatar', shapeClass && "avatar_shape_".concat(shapeClass), 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: jsxs("div", { className: clsx('avatar__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)), children: [before, src ? (jsx(Image, { className: "avatar__image", shape: "geometric", src: src })) : (jsx(Text, { className: "avatar__name", size: textSize || (appearanceConfig === null || appearanceConfig ===
|
|
45
|
+
return (jsx("div", { className: clsx(className, 'avatar', shapeClass && "avatar_shape_".concat(shapeClass), 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: jsxs("div", { className: clsx('avatar__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)), children: [before, src ? (jsx(Image, { className: "avatar__image", shape: "geometric", src: src })) : (jsx(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) && (jsx(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] }) }));
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
export { Avatar, avatarAppearance, avatarConfig };
|
package/dist/components/Badge.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export { B as Badge, b as badgeAppearance, a as badgeConfig } from '../Badge-
|
|
1
|
+
export { B as Badge, b as badgeAppearance, a as badgeConfig } from '../Badge-CcaG-4ly.js';
|
|
2
|
+
import '../tslib.es6-Bwu1Cn-t.js';
|
|
2
3
|
import 'react/jsx-runtime';
|
|
3
4
|
import 'clsx';
|
|
4
5
|
import '../hooks/useDeviceTargetClassGenerator.js';
|
|
5
|
-
import '../tslib.es6-5FtW-kfi.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'lodash/camelCase';
|
|
8
8
|
import 'lodash/castArray';
|
|
9
9
|
import '../context/UIContext.js';
|
|
10
10
|
import '../hooks/useMediaQueries.js';
|
|
11
11
|
import 'react-responsive';
|
|
12
|
+
import '../utils/setViewportProperty.js';
|
|
12
13
|
import '../hooks/useStyles.js';
|
|
13
14
|
import 'lodash/maxBy';
|
|
14
15
|
import 'lodash/upperFirst';
|
|
15
16
|
import '../hooks/styleAttributes.js';
|
|
16
|
-
import '../Text-
|
|
17
|
+
import '../Text-JayJa3hj.js';
|
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as __rest, _ as __assign } from '../tslib.es6-Bwu1Cn-t.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import camelCase from 'lodash/camelCase';
|
|
6
6
|
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
7
7
|
import { useStyles } from '../hooks/useStyles.js';
|
|
8
|
-
import { I as Icon } from '../Icon-
|
|
9
|
-
import {
|
|
10
|
-
import { T as Text } from '../Text-
|
|
8
|
+
import { I as Icon } from '../Icon-BZa8B7te.js';
|
|
9
|
+
import { L as LinkWrapper } from '../Link-DN2LhPjD.js';
|
|
10
|
+
import { T as Text } from '../Text-JayJa3hj.js';
|
|
11
11
|
import 'lodash/castArray';
|
|
12
12
|
import '../context/UIContext.js';
|
|
13
13
|
import '../hooks/useMediaQueries.js';
|
|
14
14
|
import 'react-responsive';
|
|
15
|
+
import '../utils/setViewportProperty.js';
|
|
15
16
|
import 'lodash/maxBy';
|
|
16
17
|
import 'lodash/upperFirst';
|
|
17
18
|
import '../hooks/styleAttributes.js';
|
|
18
19
|
import 'react-inlinesvg';
|
|
19
|
-
import '../Tooltip-
|
|
20
|
-
import '../Title-
|
|
20
|
+
import '../Tooltip-1Jbub0K6.js';
|
|
21
|
+
import '../Title-CHgrIarR.js';
|
|
21
22
|
|
|
22
23
|
function BreadcrumbsItem(props) {
|
|
23
|
-
var children = props.children, cursor = props.cursor, className = props.className, href = props.href, iconAfter = props.iconAfter, iconAfterBgFill = props.iconAfterBgFill, iconAfterFill = props.iconAfterFill, iconAfterSize = props.iconAfterSize, _a = props.set, set = _a ===
|
|
24
|
+
var children = props.children, cursor = props.cursor, className = props.className, href = props.href, iconAfter = props.iconAfter, iconAfterBgFill = props.iconAfterBgFill, iconAfterFill = props.iconAfterFill, iconAfterSize = props.iconAfterSize, _a = props.set, set = _a === void 0 ? 'default' : _a, text = props.text, textColor = props.textColor, textColorHover = props.textColorHover, textSize = props.textSize, onClick = props.onClick;
|
|
24
25
|
var classGenerator = useDeviceTargetClassGenerator(props);
|
|
25
26
|
var fillClass = classGenerator.fillClass, positionClass = classGenerator.positionClass, shapeClass = classGenerator.shapeClass, underlineClass = classGenerator.underlineClass;
|
|
26
27
|
// @ts-expect-error
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
export { B as Button, a as buttonAppearance, b as buttonConfig } from '../Button-
|
|
1
|
+
export { B as Button, a as buttonAppearance, b as buttonConfig } from '../Button-BSzqA8CB.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../hooks/useDeviceTargetClassGenerator.js';
|
|
6
|
-
import '../tslib.es6-
|
|
6
|
+
import '../tslib.es6-Bwu1Cn-t.js';
|
|
7
7
|
import 'lodash/camelCase';
|
|
8
8
|
import 'lodash/castArray';
|
|
9
9
|
import '../context/UIContext.js';
|
|
10
10
|
import '../hooks/useMediaQueries.js';
|
|
11
11
|
import 'react-responsive';
|
|
12
|
+
import '../utils/setViewportProperty.js';
|
|
12
13
|
import '../hooks/useStyles.js';
|
|
13
14
|
import 'lodash/maxBy';
|
|
14
15
|
import 'lodash/upperFirst';
|
|
15
16
|
import '../hooks/styleAttributes.js';
|
|
16
|
-
import '../Icon-
|
|
17
|
+
import '../Icon-BZa8B7te.js';
|
|
17
18
|
import 'react-inlinesvg';
|
|
18
|
-
import '../Link-
|
|
19
|
-
import '../Tooltip-
|
|
20
|
-
import '../Text-
|
|
21
|
-
import '../Title-
|
|
22
|
-
import '../Loader-
|
|
19
|
+
import '../Link-DN2LhPjD.js';
|
|
20
|
+
import '../Tooltip-1Jbub0K6.js';
|
|
21
|
+
import '../Text-JayJa3hj.js';
|
|
22
|
+
import '../Title-CHgrIarR.js';
|
|
23
|
+
import '../Loader-K_DJmah6.js';
|
|
@@ -2,13 +2,14 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
4
4
|
import { useStyles } from '../hooks/useStyles.js';
|
|
5
|
-
import '../tslib.es6-
|
|
5
|
+
import '../tslib.es6-Bwu1Cn-t.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'lodash/camelCase';
|
|
8
8
|
import 'lodash/castArray';
|
|
9
9
|
import '../context/UIContext.js';
|
|
10
10
|
import '../hooks/useMediaQueries.js';
|
|
11
11
|
import 'react-responsive';
|
|
12
|
+
import '../utils/setViewportProperty.js';
|
|
12
13
|
import 'lodash/maxBy';
|
|
13
14
|
import 'lodash/upperFirst';
|
|
14
15
|
import '../hooks/styleAttributes.js';
|
package/dist/components/Card.js
CHANGED
|
@@ -2,21 +2,22 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
4
4
|
import { I as Image } from '../Image-D-QHhsrC.js';
|
|
5
|
-
import { T as Text } from '../Text-
|
|
6
|
-
import '../tslib.es6-
|
|
5
|
+
import { T as Text } from '../Text-JayJa3hj.js';
|
|
6
|
+
import '../tslib.es6-Bwu1Cn-t.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'lodash/camelCase';
|
|
9
9
|
import 'lodash/castArray';
|
|
10
10
|
import '../context/UIContext.js';
|
|
11
11
|
import '../hooks/useMediaQueries.js';
|
|
12
12
|
import 'react-responsive';
|
|
13
|
+
import '../utils/setViewportProperty.js';
|
|
13
14
|
import '../hooks/useStyles.js';
|
|
14
15
|
import 'lodash/maxBy';
|
|
15
16
|
import 'lodash/upperFirst';
|
|
16
17
|
import '../hooks/styleAttributes.js';
|
|
17
18
|
|
|
18
19
|
function Card(props) {
|
|
19
|
-
var children = props.children, className = props.className, image = props.image, _a = props.imageShape, imageShape = _a ===
|
|
20
|
+
var children = props.children, className = props.className, image = props.image, _a = props.imageShape, imageShape = _a === void 0 ? 'rounded' : _a, size = props.size, src = props.src, text = props.text, _b = props.textColor, textColor = _b === void 0 ? 'surfaceTextPrimary' : _b, _c = props.textSize, textSize = _c === void 0 ? 'p' : _c, textTag = props.textTag, title = props.title, _d = props.titleColor, titleColor = _d === void 0 ? 'surfaceTextPrimary' : _d, _e = props.titleSize, titleSize = _e === void 0 ? 'h5' : _e, _f = props.titleTag, titleTag = _f === void 0 ? 'span' : _f, type = props.type, onClick = props.onClick;
|
|
20
21
|
var classGenerator = useDeviceTargetClassGenerator(props);
|
|
21
22
|
var shapeClass = classGenerator.shapeClass, widthClass = classGenerator.widthClass;
|
|
22
23
|
return (jsx("div", { className: clsx(className, 'card', shapeClass && "card_shape_".concat(shapeClass), size && "card_size_".concat(size), type && "card_type_".concat(type), widthClass && "resize-horizontal_".concat(widthClass)), onClick: onClick, children: jsxs("div", { className: "card__wrapper", children: [image, src && jsx(Image, { className: "card__image", shape: imageShape, src: src }), jsxs("div", { className: "card__data", children: [title && (jsx(Text, { className: "card__data-title", size: titleSize, tag: titleTag, textColor: titleColor, children: title })), text && (jsx(Text, { className: "card__data-desc", size: textSize, tag: textTag, textColor: textColor, children: text }))] }), children] }) }));
|
package/dist/components/Cell.js
CHANGED
|
@@ -2,23 +2,24 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
4
4
|
import { useStyles } from '../hooks/useStyles.js';
|
|
5
|
-
import { I as Icon } from '../Icon-
|
|
6
|
-
import { L as Label } from '../Label-
|
|
7
|
-
import { T as Text } from '../Text-
|
|
8
|
-
import '../tslib.es6-
|
|
5
|
+
import { I as Icon } from '../Icon-BZa8B7te.js';
|
|
6
|
+
import { L as Label } from '../Label-DQyB2ThM.js';
|
|
7
|
+
import { T as Text } from '../Text-JayJa3hj.js';
|
|
8
|
+
import '../tslib.es6-Bwu1Cn-t.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
import 'lodash/camelCase';
|
|
11
11
|
import 'lodash/castArray';
|
|
12
12
|
import '../context/UIContext.js';
|
|
13
13
|
import '../hooks/useMediaQueries.js';
|
|
14
14
|
import 'react-responsive';
|
|
15
|
+
import '../utils/setViewportProperty.js';
|
|
15
16
|
import 'lodash/maxBy';
|
|
16
17
|
import 'lodash/upperFirst';
|
|
17
18
|
import '../hooks/styleAttributes.js';
|
|
18
19
|
import 'react-inlinesvg';
|
|
19
|
-
import '../Link-
|
|
20
|
-
import '../Tooltip-
|
|
21
|
-
import '../Title-
|
|
20
|
+
import '../Link-DN2LhPjD.js';
|
|
21
|
+
import '../Tooltip-1Jbub0K6.js';
|
|
22
|
+
import '../Title-CHgrIarR.js';
|
|
22
23
|
|
|
23
24
|
var cellAppearance = {
|
|
24
25
|
dev: {},
|
|
@@ -31,7 +32,7 @@ var cellConfig = {
|
|
|
31
32
|
},
|
|
32
33
|
};
|
|
33
34
|
function Cell(props) {
|
|
34
|
-
var isActive = props.isActive, _a = props.isDisabled, isDisabled = _a ===
|
|
35
|
+
var isActive = props.isActive, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, isEqual = props.isEqual, after = props.after, appearance = props.appearance, before = props.before, className = props.className, mode = props.mode, reverse = props.reverse, set = props.set, showTitleLabel = props.showTitleLabel, showValueLabel = props.showValueLabel, size = props.size, title = props.title, titleIcon = props.titleIcon, titleIconFill = props.titleIconFill, titleIconFillHover = props.titleIconFillHover, titleIconFillSize = props.titleIconFillSize, titleIconItemFill = props.titleIconItemFill, titleIconShape = props.titleIconShape, titleIconSrc = props.titleIconSrc, titleLabel = props.titleLabel, titleLabelAppearance = props.titleLabelAppearance, titleLabelShape = props.titleLabelShape, titleLabelSize = props.titleLabelSize, titleLabelTextSize = props.titleLabelTextSize, titleTag = props.titleTag, titleTextColor = props.titleTextColor, titleTextSize = props.titleTextSize, titleTextTruncate = props.titleTextTruncate, titleTextWeight = props.titleTextWeight, titleTextWrap = props.titleTextWrap, value = props.value, valueIcon = props.valueIcon, valueIconFill = props.valueIconFill, valueIconFillHover = props.valueIconFillHover, valueIconFillSize = props.valueIconFillSize, valueIconItemFill = props.valueIconItemFill, valueIconShape = props.valueIconShape, valueIconSrc = props.valueIconSrc, valueLabel = props.valueLabel, valueLabelAppearance = props.valueLabelAppearance, valueLabelShape = props.valueLabelShape, valueLabelSize = props.valueLabelSize, valueLabelTextSize = props.valueLabelTextSize, valueTag = props.valueTag, valueTextAlign = props.valueTextAlign, valueTextColor = props.valueTextColor, valueTextSize = props.valueTextSize, valueTextTruncate = props.valueTextTruncate, valueTextWeight = props.valueTextWeight, valueTextWrap = props.valueTextWrap, zeroGap = props.zeroGap, zeroPadding = props.zeroPadding, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
35
36
|
// @ts-expect-error
|
|
36
37
|
var appearanceConfig = cellConfig.appearance && cellConfig.appearance[appearance];
|
|
37
38
|
var classGenerator = useDeviceTargetClassGenerator(props, appearanceConfig);
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
4
|
-
import { T as Text } from '../Text-
|
|
5
|
-
import '../tslib.es6-
|
|
4
|
+
import { T as Text } from '../Text-JayJa3hj.js';
|
|
5
|
+
import '../tslib.es6-Bwu1Cn-t.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'lodash/camelCase';
|
|
8
8
|
import 'lodash/castArray';
|
|
9
9
|
import '../context/UIContext.js';
|
|
10
10
|
import '../hooks/useMediaQueries.js';
|
|
11
11
|
import 'react-responsive';
|
|
12
|
+
import '../utils/setViewportProperty.js';
|
|
12
13
|
import '../hooks/useStyles.js';
|
|
13
14
|
import 'lodash/maxBy';
|
|
14
15
|
import 'lodash/upperFirst';
|
|
@@ -46,7 +47,7 @@ var checkboxConfig = {
|
|
|
46
47
|
},
|
|
47
48
|
};
|
|
48
49
|
function Checkbox(props) {
|
|
49
|
-
var id = props.id, after = props.after, appearance = props.appearance, before = props.before, checked = props.checked, className = props.className, desc = props.desc, descTextColor = props.descTextColor, descTextSize = props.descTextSize, descTextWeight = props.descTextWeight, disabled = props.disabled, label = props.label, labelTextColor = props.labelTextColor, labelTextSize = props.labelTextSize, labelTextWeight = props.labelTextWeight, _a = props.Tag, Tag = _a ===
|
|
50
|
+
var id = props.id, after = props.after, appearance = props.appearance, before = props.before, checked = props.checked, className = props.className, desc = props.desc, descTextColor = props.descTextColor, descTextSize = props.descTextSize, descTextWeight = props.descTextWeight, disabled = props.disabled, label = props.label, labelTextColor = props.labelTextColor, labelTextSize = props.labelTextSize, labelTextWeight = props.labelTextWeight, _a = props.Tag, Tag = _a === void 0 ? 'label' : _a, value = props.value, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus;
|
|
50
51
|
var appearanceConfig = checkboxConfig.appearance && checkboxConfig.appearance[appearance];
|
|
51
52
|
var classGenerator = useDeviceTargetClassGenerator(props, appearanceConfig);
|
|
52
53
|
var fillClass = classGenerator.fillClass, shapeClass = classGenerator.shapeClass, stateBorderWidthClass = classGenerator.stateBorderWidthClass, stateShapeClass = classGenerator.stateShapeClass, widthClass = classGenerator.widthClass;
|
|
@@ -59,7 +60,7 @@ function Checkbox(props) {
|
|
|
59
60
|
var stateBorderColorDisabledClass = classGenerator.getClass(checked ? 'stateBorderColorDisabledChecked' : 'stateBorderColorDisabled', { prefix: 'border-color_' });
|
|
60
61
|
return (jsxs(Tag, { className: clsx(className, 'checkbox', fillClass && "fill_".concat(fillClass), shapeClass && "checkbox_shape_".concat(shapeClass), widthClass && "width_".concat(widthClass)), htmlFor: Tag === 'label' && id, children: [before, jsxs("div", { className: clsx('checkbox__item', stateCheckmarkFillClass), children: [jsx("input", { className: "checkbox__input", checked: checked, disabled: disabled,
|
|
61
62
|
// @ts-expect-error
|
|
62
|
-
id: id, type: "checkbox", value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus }), jsx("div", { className: clsx('checkbox__state', disabled ? stateFillDisabledClass : stateFillClass, disabled ? stateBorderColorDisabledClass : stateBorderColorClass, stateShapeClass && "checkbox__state_shape_".concat(stateShapeClass), stateBorderWidthClass && "border-width_".concat(stateBorderWidthClass)), children: "\u00A0" }), jsx("div", { className: "checkbox__state-checkmark", children: "\u00A0" })] }), label && (jsx(Text, { className: "checkbox__label", size: labelTextSize || (appearanceConfig === null || appearanceConfig ===
|
|
63
|
+
id: id, type: "checkbox", value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus }), jsx("div", { className: clsx('checkbox__state', disabled ? stateFillDisabledClass : stateFillClass, disabled ? stateBorderColorDisabledClass : stateBorderColorClass, stateShapeClass && "checkbox__state_shape_".concat(stateShapeClass), stateBorderWidthClass && "border-width_".concat(stateBorderWidthClass)), children: "\u00A0" }), jsx("div", { className: "checkbox__state-checkmark", children: "\u00A0" })] }), label && (jsx(Text, { className: "checkbox__label", size: labelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextSize), textColor: labelTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextColor), textWeight: labelTextWeight, children: label })), desc && (jsx(Text, { className: "checkbox__desc", size: descTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.descTextSize), textColor: descTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.descTextColor), textWeight: descTextWeight, children: desc })), after && jsx("div", { className: "checkbox__after", children: after })] }));
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
export { Checkbox, checkboxAppearance, checkboxConfig, checkboxState };
|